package krasa.usefulactions;

/**
 * @author Vojtech Krasa
 */
public class ReplaceSlash extends AbstractStringManipAction {

    public String transform(String s) {
        String result;
        if (s.contains("\\")) {
            result = s.replaceAll("\\\\", "/");
        } else {
            result = s.replaceAll("/", "\\\\");
        }
        return result;
    }

}
